package com.qf.smsplatform.common.exception;

import com.qf.smsplatform.common.enums.SmsEnum;

/**
 * projectName: smsplatform
 *
 * @author: MaTianWei
 * time: 2021/8/11 21:04
 * description:需要抛出的异常信息
 */

public class SmsException extends RuntimeException{
    private Integer code;
    public SmsException(Integer code,String message) {
        super(message);
        this.code = code;
    }

    public SmsException(SmsEnum smsEnum) {
        super(smsEnum.getMsg());
        this.code = smsEnum.getCode();
    }

    public Integer getCode() {
        return code;
    }
}
